<template>
  <div id="app">
    <router-view/>
  </div>
</template>

<script>
export default {
  name: "App",
  destroyed() {
    window.addEventListener('beforeunload',this.closeWindow)
  },
  methods: {
    closeWindow(){
      localStorage.clear();
      window.removeItem("token")
    }
  }
}
</script>

<style lang="less">
#app {
  height: 100%;
}
</style>
